package ch5;

import java.util.Scanner;

/**
 * @author oldliu
 * @since 1.0
 */
public class GetMax {
    public static void main(String[] args) {
        Scanner i=new Scanner(System.in);
        System.out.println("请输入第一个数：");
        double a=i.nextDouble();
        System.out.println("请输入第二个数：");
        double b=i.nextDouble();
        System.out.println("请输入第三个数：");
        double c=i.nextDouble();
        double d=a<b?a:b;
        double min=d<c?d:c;
        double max=(a>b?a:b)>c?(a>b?a:b):c;
        double mid=((a>b?a:b)<c?(a>b?a:b):(c>(a<b?a:b)?c:(a<b?a:b)));
        System.out.println("从小到大的顺序为"+min+"   "+mid+"   "+max);
    }
}
